import { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/mall',
    name: 'Mall',
    redirect: '/mall/recommend',
    meta: {
      title: '云游商城'
    },
    children: [
      {
        path: 'recommend',
        name: 'Recommend',
        component: () => import('@renderer/views/mall/recommend/index.vue'),
        meta: {
          title: '推荐',
          tab: true
        }
      },
      {
        path: 'drinks',
        name: 'Drinks',
        component: () => import('@renderer/views/mall/drink/index.vue'),
        meta: {
          title: '饮品',
          tab: true
        }
      },
      {
        path: 'snack',
        name: 'Snack',
        component: () => import('@renderer/views/mall/snack/index.vue'),
        meta: {
          title: '零食/小吃',
          tab: true
        }
      },
      // lightMeal
      {
        path: 'meal',
        name: 'Meal',
        component: () => import('@renderer/views/mall/meal/index.vue'),
        meta: {
          title: '零食/小吃',
          tab: true
        }
      },
      {
        path: 'combo',
        name: 'Combo',
        component: () => import('@renderer/views/mall/combo/index.vue'),
        meta: {
          title: '精选套餐',
          tab: false
        }
      },
      {
        path: 'coupon',
        name: 'MallCoupon',
        component: () => import('@renderer/views/mall/order/before.vue'),
        meta: {
          title: '生成订单',
          tab: false
        }
      },
      {
        path: 'pay',
        name: 'Pay',
        component: () => import('@renderer/views/mall/pay/index.vue'),
        meta: {
          title: '支付中心',
          tab: false
        }
      },
      {
        path: '/detail/:id',
        name: 'Detail',
        component: () => import('@renderer/views/mall/detail/index.vue'),
        meta: {
          title: '商品详情',
          tab: false
        }
      },
      {
        path: '/seckill',
        name: 'SecKill',
        component: () => import('@renderer/views/mall/seckill/index.vue'),
        meta: {
          title: '秒杀中心',
          tab: false
        }
      },
      {
        path: '/coupon_list',
        name: 'CouponList',
        component: () => import('@renderer/views/coupon/use.vue'),
        meta: {
          title: '优惠券商品',
          tab: false
        }
      }
    ]
  }
]

export default routes
